package top.hcode.hoj.common;

import lombok.extern.slf4j.Slf4j;

/**
 * @author orangej
 * @since 2024/12/10
 */
@Slf4j
public abstract class SafeRunnable implements Runnable {
    @Override
    public void run() {
        try {
            safeRun();
        } catch (Exception e) {
            log.error("error in SafeRunnable.run", e);
        }
    }

    public abstract void safeRun();
}
